package com.pie4cloud.pie.job.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.pie4cloud.pie.job.api.dto.SystemInfoDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

@Data
@Entity
@Table(name = "T_DMZ_INFO")
@DiscriminatorValue("DMZ")
public class DmzEntity extends JobInfoEntity {
	@Id
	@Column(name = "ID", length = 255)
	@TableId(value = "Id", type = IdType.ASSIGN_ID)
	@GenericGenerator(name = "snowflakeId", strategy = "com.pie4cloud.pie.jpa.id.GenerateSnowflakeId")
	@GeneratedValue(generator = "snowflakeId")
	@ApiModelProperty(value = "id")
	private Long id;

	@Column(name = "host", length = 50)
	private String host;

	@Column(name = "port", length = 50)
	private Integer port;

	@Column(name = "netty_port", length = 50)
	private Integer nettyPort;
    @Transient
	private SystemInfoDto systemInfoDto;

}
